package com.example.springblog2.service;

import com.example.springblog2.mapper.UserInfoMapper;
import com.example.springblog2.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Autowired
    private UserInfoMapper userInfoMapper;

    public UserInfo queryByName(String userName) {
        return userInfoMapper.queryByName(userName);
    }

    public UserInfo queryById(Integer userId) {
        return userInfoMapper.queryById(userId);
    }

    public Integer registry(String name,String password) {
        return userInfoMapper.registry(name,password);
    }
}
